package com.wujilin.okra.database.handler;

import android.database.Cursor;

import com.wujilin.okra.database.CursorHandler;
import com.wujilin.okra.database.Sql;

public class ScalarHandler<T> implements CursorHandler<T> {
	@SuppressWarnings("unchecked")
	@Override
	public T handle(Cursor cursor) {
		return (T) (cursor.moveToNext() ? Sql.getObject(cursor) : null);
	}
}
